class IrisLookupsController < ApplicationController
  # GET /iris_lookups
  # GET /iris_lookups.xml
  def index
    @iris_lookups = IrisLookup.find(:all)

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @iris_lookups }
    end
  end

  # GET /iris_lookups/1
  # GET /iris_lookups/1.xml
  def show
    @iris_lookup = IrisLookup.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @iris_lookup }
    end
  end

  # GET /iris_lookups/new
  # GET /iris_lookups/new.xml
  def new
    @iris_lookup = IrisLookup.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @iris_lookup }
    end
  end

  # GET /iris_lookups/1/edit
  def edit
    @iris_lookup = IrisLookup.find(params[:id])
  end

  # POST /iris_lookups
  # POST /iris_lookups.xml
  def create
    @iris_lookup = IrisLookup.new(params[:iris_lookup])

    respond_to do |format|
      if @iris_lookup.save
        flash[:notice] = 'IrisLookup was successfully created.'
        format.html { redirect_to(@iris_lookup) }
        format.xml  { render :xml => @iris_lookup, :status => :created, :location => @iris_lookup }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @iris_lookup.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /iris_lookups/1
  # PUT /iris_lookups/1.xml
  def update
    @iris_lookup = IrisLookup.find(params[:id])

    respond_to do |format|
      if @iris_lookup.update_attributes(params[:iris_lookup])
        flash[:notice] = 'IrisLookup was successfully updated.'
        format.html { redirect_to(@iris_lookup) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @iris_lookup.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /iris_lookups/1
  # DELETE /iris_lookups/1.xml
  def destroy
    @iris_lookup = IrisLookup.find(params[:id])
    @iris_lookup.destroy

    respond_to do |format|
      format.html { redirect_to(iris_lookups_url) }
      format.xml  { head :ok }
    end
  end
end
